package com.lq.ecoldchain.ui.main.message

import android.databinding.DataBindingUtil
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.lq.ecoldchain.R
import com.lq.ecoldchain.databinding.MessageItemBinding
import com.lq.ecoldchain.entity.Message

/*
*2018/12/27 0027  19:08
*function by lq
*/
class MessageAdapter(list:List<Message>):BaseQuickAdapter<Message,BaseViewHolder>(R.layout.message_item,list){
    override fun convert(helper: BaseViewHolder?, item: Message?) {
        val binding = DataBindingUtil.bind<MessageItemBinding>(helper!!.itemView)
        binding!!.item = item
        binding.executePendingBindings()
    }
}